<template>
  <div class="trade_detail">
     <h4>交易列表>交易详情</h4>
     <div class="container">
          <div class="item">
              <div class="left">用户名:</div>
              <div class="right">{{tradeDetainInfo.name}}</div>
          </div>
          <div class="item">
              <div class="left">联系方式:</div>
              <div class="right">{{tradeDetainInfo.tel}}</div>
          </div>
          <div class="item">
              <div class="left">交易类型:</div>
              <div class="right">{{tradeDetainInfo.operateType}}</div>
          </div>
          <div class="item">
              <div class="left">交易时间:</div>
              <div class="right">{{tradeDetainInfo.addTimeStr}}</div>
          </div>
          <div class="item">
              <div class="left">交易金额:</div>
              <div class="right">{{tradeDetainInfo.money}}元</div>
          </div>
          <div class="item">
              <div class="left">交易方式:</div>
              <div class="right">{{tradeDetainInfo.operateWay}}</div>
          </div>
          <el-button type="primary" style="margin-left: 80px;margin-top: 50px;" @click="go_back()">返回</el-button>
     </div>
  </div>
</template>

<script>
import { tradeDetail } from '@/request/api'
export default {
    data(){
      return {
          tradeDetainInfo:{

          }
      }
    },
    created(){
       this.get_tradeDetail();
    },
    methods:{
        go_back(){
           this.$router.push({path:'/trade',query:{detail:true}})
        },
        get_tradeDetail(){
            tradeDetail({
                walletRecordId:this.$route.params.id
            }).then(res =>{
                this.tradeDetainInfo = res.data[0];
            })
        }
    }
 }
</script>
<style  scoped>
.trade_detail  h4 {
    line-height: 22px;
    border-left: 5px solid rgb(32, 160, 255);
    font-size:16px;
    color: #666;
    padding-left:  10px;
    font-size:18px;
    margin-bottom:20px;
}
.container .item {
    display: flex;
    line-height: 36px;

}
.container .item  div {
    font-size: 14px;
    color:#333;
}
.container .item .left {
   width: 100px;
   text-align: right;
   margin-right: 30px;
   
}
</style>